package top.infopub.enums.hr;

import org.apache.commons.lang3.StringUtils;
import top.infopub.enums.mkt.BackMechEnum;

public enum PostGroupEnum {
    FINANCE("C204D2560C541727E053020011AC38D3", "财务审批人员");

    private String code;

    private String name;

    PostGroupEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public static PostGroupEnum getByCode(String code) {
        if (StringUtils.isBlank(code)) return null;
        for (PostGroupEnum pge : PostGroupEnum.values()) {
            if (StringUtils.equals(code, pge.getCode())) {
                return pge;
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
